home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / patch / ppak25_1.lha / PhonePak_2.5 / programmingFAXXSpec.doc < prev    next >
Text File  |  1994-05-18  |  3KB  |  84 lines

  1. FAXX (IFF facsimile FORM)
  2.  
  3. IFF FORM / CHUNK DESCRIPTION
  4. ============================
  5.  
  6. Form/Chunk IDs:
  7.     FORM:   FAXX
  8.     Chunks: FXHD, PAGE, FLOG
  9.     
  10. Date Submitted: 07/19/92
  11. Submitted by:   Christopher E. Darsch - Atlantis Design Group, Inc.
  12. Revision:       1.1
  13.  
  14.  
  15. FXHD Chunk
  16. ==========
  17.  
  18.     The required property chunk "FXHD" contains a FaxHeader as defined in 
  19. the following header file.  The FaxHeader contains data necessary to interpret
  20. the data chunk "PAGE".  The pixel size of the image can be determined from the
  21. contents of the FaxHeader structure, as well as the dimensions of the source 
  22. document.  The compression method used to encode the "PAGE" chunk is also part
  23. of the FaxHeader.  
  24.  
  25. PAGE Chunk
  26. ==========
  27.  
  28.     The required data chunk "PAGE" contains the encoded bit-packed fax image
  29. data that is transmitted/received during phase C of a facsimile communication.
  30. The specifications for this data are contained in the CCITT Blue Book, Volume
  31. VII, Fascicle VII.3, Recommendation T.4.  The valid data begins with a fax EOL
  32. (End of line = 0b000000000001) and ends with a fax RTC (Return to control =
  33. six consecutive EOLs).  A variable number of zero bits may precede and/or
  34. follow the valid data.  This increases the efficiency of storing received fax
  35. data by eliminating the need for bit shifting.  Note, therefore, that the
  36. leading EOL and the trailing RTC may not be byte-aligned.
  37.  
  38.     A multiple-page fax can be stored variously as multiple files, an IFF CAT
  39. object, or, most preferably, an IFF LIST object with a shared FXHD chunk.
  40.  
  41. FLOG Chunk
  42. ==========
  43.  
  44.     The optional data chunk "FLOG" contains log information about a received
  45. fax.  The specification for this chunk will be submitted at a later date.
  46.  
  47. /***************************************************************************/
  48. /* FaxxIFF.h                                                               */
  49. /***************************************************************************/
  50.  
  51. #define ID_FAXX     MakeID('F','A','X','X')
  52. #define ID_FXHD     MakeID('F','X','H','D')
  53. #define ID_PAGE     MakeID('P','A','G','E')
  54. #define ID_FLOG     MakeID('F','L','O','G')
  55.  
  56. /* LineLength Codes */
  57.  
  58. #define FXLNGSTD    215     /* 1728 pixels along std line lng of 215mm */
  59. #define FXLNGLONG   255     /* 2048 pixels along opt line lng of 255mm */
  60. #define FXLNGLONGER 303     /* 2432 pixels along opt line lng of 303mm */
  61. #define FXLNGA5     151     /* 1216/1728 pixels along opt line lng of 151mm */
  62. #define FXLNGA6     107     /* 864/1728 pixels along opt line lng of 107mm */
  63.  
  64. /* VRes Codes */
  65.  
  66. #define FXVRESNORM  385     /* Normal resolution: 3.85 lines/mm */
  67. #define FXVRESFINE  770     /* Fine resolution: 7.7 lines/mm */
  68.  
  69. /* Compression Codes */
  70. /* Codes 129, 130, and 131 are reserved */
  71.  
  72. #define FXCMPNONE   0       /* No compression -- available under Group IV */
  73. #define FXCMPMH     1       /* One-dimensional (MH) coding */
  74. #define FXCMPMR     2       /* Two-dimensional (MR) coding */
  75. #define FXCMPMMR    4       /* Modified Two-dimensional (MMR) coding */
  76.  
  77. typedef struct {
  78.     UWORD Width, Height;    /* Image width and height, in pixels */
  79.     UWORD LineLength;       /* Scan line length, in millimeters */
  80.     UWORD VRes;             /* Vertical Resolution, in lines/100mm */
  81.     UBYTE Compression;      /* Compression method */    
  82.     UBYTE Pad[11];          /* Room for expansion */
  83. } FaxHeader;
  84.